<?php

namespace Biz\model\activity;

/**
 * 云鲸扫地机器人设计师征集令
 */
class NarwalDesigner extends \Doraemon\pockets\datebase\BaseDbModel
{
    const _CONFIG_FILE_ = 'db_store';

    const _CONFIG_SELECT_ = 'db_brand_activity';

    const _DATABASE_ = 'brand_activity';

    const _TABLE_NAME = 'narwal_designer_collect';


    public static function insertData($data)
    {
        $data['addtime'] = date('Y-m-d H:i:s');
        $ret = self::insert($data);
        if ($ret->errorCode() !== '00000') {
            return false;
        }
        return self::id();
    }

    public static function updateData($data, $where)
    {
        $ret = self::update($data, $where);
        if ($ret->errorCode() !== '00000') {
            return false;
        }
        return true;
    }

    public static function geByCondition($condition)
    {
        return self::get("*", $condition);
    }

    public static function selectListByCondition($condition)
    {
        return self::select("*", $condition);
    }


}